<script setup>
import { onMounted, onUnmounted } from 'vue'

onMounted(() => {
  console.log('2.组件挂载后执行');
})
onUnmounted(() => {
  console.log('3.组件卸载后执行');
})
console.log('1.组件创建前就执行');

</script>
<template>
  <h1> 生命周期函数</h1>

</template>
<style></style>
